package com.hzit.controller;

import com.hzit.entity.Student;
import com.hzit.service.IStudentService;
import com.hzit.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/student")
public class StudentController {
	@Autowired
	private IStudentService studentService;
	//1. 列表学生
	@GetMapping("/list")
	public R findAll(){
		List<Student> studentList = studentService.list();
		return R.ok(studentList);
	}
}
